Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

486
Views
RangeError [MESSAGE_CONTENT_TYPE]: Message content must be a non-empty string. (discord.js v13)

So I am basically making a command that fetches a website and sends a message. But I get this error: RangeError [MESSAGE_CONTENT_TYPE]: Message content must be a non-empty string. and i followed axios and discord.js v13 docs.

Any help?

const Discord = require('discord.js')
const { MessageEmbed } = require('discord.js')
var webshot = require('node-webshot');
const axios = require('axios')
module.exports = {
    name: "status",
    description: "",
    async execute(message, args, client) {
         
        let argfor = args.slice(` `)
        if(!argfor) { 
            message.channel.send("No username input") 
        } else {
        message.channel.send("Waiting for response from swordbattle.io")
        let res = await axios.get('http://swordbattle.io/api/serverinfo');

        let data = res.data;
        message.channel.send({ content: data})
      }
    
    }
}
about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Help from jabaa

Had to serialize it.

const { MessageEmbed } = require('discord.js')
var webshot = require('node-webshot');
const axios = require('axios')
module.exports = {
    name: "status",
    description: "",
    async execute(message, args, client) {
         
        let argfor = args.slice(` `)
        if(!argfor) { 
            message.channel.send("No username input") 
        } else {
        message.channel.send("Waiting for response from swordbattle.io")
        let res = await axios.get('http://swordbattle.io/api/serverinfo');

        let data = res.data;
        const lma = JSON.stringify({ content: data})
        message.channel.send({ content: lma})
      }
    
    }
}```
about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!